<template>
    <!-- // NRCUDU性能统计表-小区(天) -->
    <index-card :indexCardTitle="indexCardTitle">
        <el-table :data="tableData" v-loading="loading">
            <el-table-column prop="startTime" label="开始时间" min-width="200">
                <template #default="scope">
                    {{ scope.row.startTime ? formatDateNormal(scope.row.startTime) : null }}
                </template>
            </el-table-column>
            <el-table-column prop="eci" label="小区码CI" min-width="200" />
            <el-table-column prop="cgi" label="小区CGI" min-width="200" />
            <el-table-column prop="gnodebId" label="GNODEB_ID" min-width="200" />
            <el-table-column prop="cellName" label="NRCELL名称" min-width="200" />
            <el-table-column prop="lifecycleStatus" label="小区生命周期状态" min-width="200" />
            <el-table-column prop="saFlag" label="NSA/SA标志" min-width="200" />
            <el-table-column prop="cityName" label="所属地市" min-width="200" />
            <el-table-column prop="areaName" label="所属区县" min-width="200" />
            <el-table-column prop="kpiVoNrTraffic5Qi1" label="VoNR语音话务量(Erl)" min-width="200" />
            <el-table-column prop="kpiViNrTraffic5Qi2" label="ViNR语音话务量(Erl)" min-width="200" />
            <el-table-column prop="kpiVoNrFlowDropRate" label="VoNR业务QoS Flow掉线率（5QI1）（网络级）(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutRateInterSystemNrToLte" label="NR到LTE的系统间切换出成功率(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutRateInterSystemLteToNr" label="LTE到NR的系统间切换入成功率(%)" min-width="200" />
            <el-table-column prop="kpiEsfbHoSuccOutRateInterSystemNrToLte" label="NR到LTE的基于切换的EPSFB成功率(%)"
                min-width="200" />
            <el-table-column prop="kpiEpsfbSuccRate" label="EPSFB成功率(%)" min-width="200" />
            <el-table-column prop="flowNbrAttEstab5Qi1" label="分5QI的Flow建立请求数_5QI1(次)" min-width="200" />
            <el-table-column prop="flowNbrReqRelGnb5Qi1" label="分5QI的gNB请求释放的Flow数_5QI1(次)" min-width="200" />
            <el-table-column prop="flowNbrReqRelGnbNormal5Qi1" label="分5QI的正常的gNB请求释放的Flow数_5QI1(次)" min-width="200" />
            <el-table-column prop="flowHoAdmitFail5Qi1" label="分5QI的切出接纳失败的Flow数_5QI1(次)" min-width="200" />
            <el-table-column prop="flowNbrLeft5Qi1" label="分5QI的遗留Flow个数_5QI1(次)" min-width="200" />
            <el-table-column prop="flowNbrHoInc5Qi1" label="每5QI切换入Flow数_5QI1(次)" min-width="200" />
            <el-table-column prop="kpiVoNrSuccConnRate" label="VoNR业务接通成功率(5QI1)(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutRateVoNrToLte" label="VoNR到VoLTE的系统间切换出成功率(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutRateInterSystemVoLteToVoNr" label="VoLTE到VoNR的系统间切换入成功率(%)"
                min-width="200" />
            <el-table-column prop="kpiHoSuccOutRateVoNr" label="VoNR系统内切换成功率(%)" min-width="200" />
            <el-table-column prop="kpiVoNrFlowSuccConnRate" label="VoNR业务Flow建立成功率(5QI1)（小区级）(%)" min-width="200" />
            <el-table-column prop="kpiVoNrFlowDropRateCellLevel" label="VoNR业务Flow掉线率（5QI1）（小区级）(%)" min-width="200" />
            <el-table-column prop="iratHoSuccPrepOutEutranEpsFallBack" label="EpsFallBack切换至LTE准备成功次数(次)"
                min-width="200" />
            <el-table-column prop="flowNbrSuccEstab5Qi1" label="分5QI的Flow建立成功数_5QI1(次)" min-width="200" />
            <el-table-column prop="rlcUeThrpLessThan1MbpsUl" label="小区UE上行速率小于1Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp1to2MbpsUl" label="小区UE上行速率1~2Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp2to5MbpsUl" label="小区UE上行速率2~5Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp5to10MbpsUl" label="小区UE上行速率5~10Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp10to20MbpsUl" label="小区UE上行速率10~20Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp20to50MbpsUl" label="小区UE上行速率20~50Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrpGtOrEq50MbpsUl" label="小区UE上行速率大于等于50Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrpLessThan5MbpsDl" label="小区UE下行速率小于5Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp5To10MbpsDl" label="小区UE下行速率5~10Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp10To30MbpsDl" label="小区UE下行速率10~30Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp30To50MbpsDl" label="小区UE下行速率30~50Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp50To100MbpsDl" label="小区UE下行速率50~100Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp100To200MbpsDl" label="小区UE下行速率100~200Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrp200To500MbpsDl" label="小区UE下行速率200~500Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="rlcUeThrpGtOrEq500MbpsDl" label="小区UE下行速率大于等于500Mbps的样本数(个)" min-width="200" />
            <el-table-column prop="kpiUeThrplessthan1MbpsUlRatio" label="小区UE上行速率低于1Mbps样本比例(%)" min-width="200" />
            <el-table-column prop="kpiUeThrplessthan5MbpsDlRatio" label="小区UE下行速率低于5Mbps样本比例(%)" min-width="200" />
            <el-table-column prop="kpiUeThrpUlless1MpsDlless5MbpsRatio" label="小区UE上行速率低于1M下行低于5M样本比例(%)"
                min-width="200" />
            <el-table-column prop="iratHoAttOutEutran" label="切换至LTE准备请求次数(次)" min-width="200" />
            <el-table-column prop="kpiPdcpUpOctUl" label="PDCP上行业务字节数(Mbyte)" min-width="200" />
            <el-table-column prop="kpiPdcpUpOctDl" label="PDCP下行业务字节数(Mbyte)" min-width="200" />
            <el-table-column prop="kpiRrcSuccConnRate" label="RRC连接建立成功率(%)" min-width="200" />
            <el-table-column prop="kpiFlowSuccConnRate" label="QoS Flow建立成功率(%)" min-width="200" />
            <el-table-column prop="kpiNgsigSuccConnRate" label="NG接口UE相关逻辑信令连接建立成功率(%)" min-width="200" />
            <el-table-column prop="kpiWirelessSuccConnRate" label="无线接通率(%)" min-width="200" />
            <el-table-column prop="kpiWirelessDropRateCellLevel" label="无线掉线率（小区级）(%)" min-width="200" />
            <el-table-column prop="kpiFlowDropRateCellLevel" label="Flow掉线率（小区级）(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutInterGnbRateNg" label="gNB间NG切换成功率(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutInterGnbRateXn" label="gNB间Xn切换成功率(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutInterGnbRate" label="gNB间切换成功率(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutIntraGnbRate" label="gNB内切换成功率(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutRate" label="切换成功率(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutRateIntraFreq" label="同频切换执行成功率(%)" min-width="200" />
            <el-table-column prop="kpiHoSuccOutRateInterFreq" label="异频切换执行成功率(%)" min-width="200" />
            <el-table-column prop="rlcUpOctUl" label="小区上行RLC SDU接收字节数(KByte)" min-width="200" />
            <el-table-column prop="rlcUpOctDl" label="小区下行RLC SDU发送字节数(KByte)" min-width="200" />
            <el-table-column prop="rlcThrpTimeUl" label="小区RLC层接收上行数据的业务总时长(ms)" min-width="200" />
            <el-table-column prop="rlcThrpTimeDl" label="小区RLC层发送下行数据的业务总时长(ms)" min-width="200" />
            <el-table-column prop="rlcUpLastTtiOctUl" label="小区用户面RLC SDU上行尾包字节数(KByte)" min-width="200" />
            <el-table-column prop="rlcUpLastTtiOctDl" label="小区用户面RLC SDU下行尾包字节数(KByte)" min-width="200" />
            <el-table-column prop="kpiMacBlerUl" label="MAC层上行误块率(%)" min-width="200" />
            <el-table-column prop="kpiMacBlerDl" label="MAC层下行误块率(%)" min-width="200" />
            <el-table-column prop="kpiHarqRetransRateUl" label="上行HARQ重传比率(%)" min-width="200" />
            <el-table-column prop="kpiHarqRetransRateDl" label="下行HARQ重传比率(%)" min-width="200" />
            <el-table-column prop="kpiRank2PercentDl" label="下行双流占比(%)" min-width="200" />
            <el-table-column prop="kpiRank3PercentDl" label="下行3流占比(%)" min-width="200" />
            <el-table-column prop="kpiRank4PercentDl" label="下行4流占比(%)" min-width="200" />
            <el-table-column prop="kpiQpskPercentUl" label="上行QPSK编码比例(%)" min-width="200" />
            <el-table-column prop="kpi16QamPercentUl" label="上行16QAM编码比例(%)" min-width="200" />
            <el-table-column prop="kpi64QamPercentUl" label="上行64QAM编码比例(%)" min-width="200" />
            <el-table-column prop="kpi256QamPercentUl" label="上行256QAM编码比例(%)" min-width="200" />
            <el-table-column prop="kpiQpskPercentDl" label="下行QPSK编码比例(%)" min-width="200" />
            <el-table-column prop="kpi16QamPercentDl" label="下行16QAM编码比例(%)" min-width="200" />
            <el-table-column prop="kpi64QamPercentDl" label="下行64QAM编码比例(%)" min-width="200" />
            <el-table-column prop="kpi256QamPercentDl" label="下行256QAM编码比例(%)" min-width="200" />
            <el-table-column prop="nsaSgnbDropNum" label="SN异常释放率（NSA SgNB掉话率）分子" min-width="200" />
            <el-table-column prop="nsaSgnbDropDen" label="SN异常释放率（NSA SgNB掉话率）分母" min-width="200" />
            <el-table-column prop="nsaSgnbAddNum" label="NSA SgNB添加成功（分子）" min-width="200" />
            <el-table-column prop="nsaSgnbAddDen" label="NSA SgNB添加成功（分母）" min-width="200" />
            <el-table-column prop="usrThputDl" label="用户下行平均吞吐率(Mbps)" min-width="200" />
            <el-table-column prop="usrThputUl" label="用户上行平均吞吐率(Mbps)" min-width="200" />
            <el-table-column prop="cellThputDl" label="小区下行平均吞吐率(Mbps)" min-width="200" />
            <el-table-column prop="cellThputUl" label="小区上行平均吞吐率(Mbps)" min-width="200" />
            <el-table-column prop="nsaSgnbDropRate" label="SN异常释放率（NSA SgNB掉话率）(%)" min-width="200" />
            <el-table-column prop="nsaSgnbAddRate" label="NSA SgNB添加成功率(%)" min-width="200" />
            <el-table-column prop="phyUlMeanNlPrb" label="小区RB上行平均干扰电平(dBm)" min-width="200" />
            <el-table-column prop="phyUlMaxNlPrb" label="小区RB上行最大干扰电平(dBm)" min-width="200" />
            <el-table-column prop="irathoAttOutEutranEpsFallBack" label="EpsFallBack切换至LTE准备请求次数(次)" min-width="200" />
            <el-table-column prop="irathoSuccOutEutranEpsFallBack" label="EpsFallBack切换至LTE成功次数(次)" min-width="200" />
            <el-table-column prop="rrcRedirectToLteEpsfallback" label="EPS fallback RRC 重定向到LTE次数(次)" min-width="200" />
            <el-table-column prop="pdcpUpOctUl5Qi" label="区分5QI小区用户面上行PDCP PDU字节数(KByte) " min-width="200" />
            <el-table-column prop="pdcpUpOctDl5Qi" label="区分5QI小区用户面下行PDCP PDU字节数(KByte)" min-width="200" />
            <el-table-column prop="rrcAttConnestab" label="RRC连接建立请求次数(次)" min-width="200" />
            <el-table-column prop="rrcSuccConnestab" label="RRC连接建立成功次数(次)" min-width="200" />
            <el-table-column prop="rrcAttConnReestab" label="RRC连接重建请求次数(次)" min-width="200" />
            <el-table-column prop="rrcSuccConnReestab" label="RRC连接重建成功次数(次)" min-width="200" />
            <el-table-column prop="macNbrTbUl5Qi1" label="5QI1上行传输TB数(个)" min-width="200" />
            <el-table-column prop="macNbrInitTbUl5Qi1" label="5QI1上行传输初始TB数(个)" min-width="200" />
            <el-table-column prop="macNbrSuccInitTbUl5Qi1" label="5QI1上行成功传输初始TB数(个)" min-width="200" />
            <el-table-column prop="kpiAvgDataRateUl" label="上行用户平均速率(Mbps)" min-width="200" />
            <el-table-column prop="kpiAvgDataRateDl" label="下行用户平均速率(Mbps)" min-width="200" />
            <el-table-column prop="rrcConnMean" label="RRC连接平均数(个)" min-width="200" />
            <el-table-column prop="rrcConnMax" label="RRC连接最大数(个)" min-width="200" />
            <el-table-column prop="pdcpUpOctDl5Qi1" label="区分5QI小区用户面下行PDCP PDU字节数_5QI1(KByte)" min-width="200" />
            <el-table-column prop="pdcpUpOctUl5Qi1" label="区分5QI小区用户面上行PDCP PDU字节数_5QI1(KByte)" min-width="200" />
            <el-table-column prop="cityId" label="地市编号" min-width="200" />
            <el-table-column prop="startTime" label="时间" min-width="200" />
            <el-table-column prop="cityName" label="地市名称" min-width="200" />
        </el-table>
    </index-card>
</template>

<script setup>
import { ref } from "vue";
import { apiCommon, formatDateNormal } from "@/utils/index.js";
import * as qualityApi from "@/api/biz/networkQuality";
import mittBus from "@/utils/mittBus"; // mitt事件总线

mittBus.on("get5GIndexItemData", (params) => {
    getData(params)
});

const props = defineProps({
    indexCardTitle: {
        type: String,
        default: '',
    },
    rowsData: {
        type: Object,
        default: () => { },
    },
});

const tableData = ref([]);
let loading = ref(false);

const getData = async (params) => {
    // console.log('params', params)

    loading.value = true;
    tableData.value = await apiCommon(qualityApi.getNrCapabilityDailyList, params);
    tableData.value = tableData.value.data;
    loading.value = false;
}

getData(props.rowsData);
</script>